package ru.fadeev.crammer;


/**
 * IndexerPhraseTask class extends IndexerTask and represents task for creating
 * phrase-index for given phrase. Created and added to storage after adding
 * or altering phrase.
 * @author Konstantin Fadeyev
 *
 */
public class IndexerPhraseTask extends IndexerTask {
	private int phraseId;
	
	
	/**
	 * Creates instance of IndexerPhraseTask
	 * @param phraseId phrase id, GFIndexer should create index for
	 * @param phraseText phrase text, GFIndexer should create index for
	 * @param inserted true, if this phrase is new, false - if updated old
	 */
	public IndexerPhraseTask(int phraseId, 
			String phraseText, boolean inserted) {
		this.phraseId = phraseId;
		this.text = phraseText;
		this.inserted = inserted;
	}


	/**
	 * @return the phraseId
	 */
	protected int getPhraseId() {
		return phraseId;
	}


	/**
	 * @param phraseId the phraseId to set
	 */
	protected void setPhraseId(int phraseId) {
		this.phraseId = phraseId;
	}
}
